using Microsoft.Phone.Data.Linq.Mapping;
using System;
using System.Data.Linq;
using System.Data.Linq.Mapping;
namespace MicroMsg.Storage
{
	[Index(Columns = "strObjectID", IsUnique = false, Name = "strObjectID"), Index(Columns = "strFromUsername ,strObjectID,nCreateTime DESC", IsUnique = false, Name = "multiColumnSearchIndex"), Index(Columns = "nCreateTime DESC", IsUnique = false, Name = "nCreateTime"), Table]
	public class SnsMsg : StorageItem
	{
		[Column(IsPrimaryKey = true, IsDbGenerated = true)]
		public int nMsgID;
		[Column]
		public string strObjectID;
		[Column]
		public string strParentID;
		[Column]
		public string strFromUsername;
		[Column]
		public string strToUsername;
		[Column]
		public string strFromNickname;
		[Column]
		public string strToNickname;
		[Column]
		public uint nType;
		[Column]
		public uint nSource;
		[Column]
		public uint nCreateTime;
		[Column]
		public string strContent;
		[Column]
		public int nReplyCommentId;
		[Column]
		public int nCommentId;
		[Column(DbType = "Image")]
		public byte[] bytesRefer;
		[Column(IsVersion = true)]
		private Binary _version;
		private SnsMsgDetail _refer;
		public SnsMsgDetail refer
		{
			get
			{
				if (this._refer != null)
				{
					return this._refer;
				}
				this._refer = StorageXml.loadFromBuffer<SnsMsgDetail>(this.bytesRefer);
				return this._refer;
			}
			set
			{
				this._refer = value;
				this.bytesRefer = StorageXml.saveToBuffer<SnsMsgDetail>(value);
			}
		}
	}
}
